package org.study.mybatisplus.dynamic.boot.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.study.mybatisplus.dynamic.boot.config.SystemConstant;
import org.study.mybatisplus.dynamic.boot.model.IotDeviceProperty;
import org.study.mybatisplus.dynamic.boot.vo.*;

import java.util.List;

/**
 * @author doveylovey
 * @version v1.0.0
 * @email 1135782208@qq.com
 * @date 2024年10月08日
 */
@Mapper
public interface IotDevicePropertyMapper extends BaseMapper<IotDeviceProperty> {
    IPage<DevicePropertyVO> selectDevicePropertyList(Page<DevicePropertyVO> page,
                                                     @Param("deviceId") Long deviceId,
                                                     @Param("propertyName") String propertyName);

    List<DeviceAlarmPropertyVO> selectDeviceAlarmPropertyList();

    @DS(SystemConstant.DS_XUGU)
    List<DevicePropertyExportVO> exportDeviceProperty(@Param("deviceId") Long deviceId);
}
